package com.example.business_oa.service;

import com.example.comment_oa.dubbo.ChaChiDaoAndZaoTuiDubbo;
import com.example.comment_oa.pojos.BelateMoney;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChaChiDaoZaoTuiService {

    @DubboReference(version = "1.0.0")
    ChaChiDaoAndZaoTuiDubbo chaChiDaoAndZaoTuiDubbo;

    @GlobalTransactional(timeoutMills = 300000)
    public List<BelateMoney>  selectChiDaoZaoTui(int biId){
        List<BelateMoney> belateMonies = chaChiDaoAndZaoTuiDubbo.selectByIdChidaoAndZaotuiAndQuanqin(biId);
        return belateMonies;
    }

}
